﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using KFGame;

public class ICCarTestObject : MonoBehaviour
{
    // Start is called before the first frame update
    ICCardHander iCCardHander;
    void Start()
    {
       iCCardHander =(ICCardHander)  KFGame.KF.Instantiation().AddOnceComponent("iCCardHander");
       iCCardHander.onCarDatas+= onGCarDatas; 
    }

     public void onGCarDatas(byte[] datas){
           Debug.Log("on car datas "+BitConverter.ToString(datas) );
     }

     private void OnDestroy() {
           iCCardHander.onCarDatas-= onGCarDatas;
        
     }
    // Update is called once per frame
    void Update()
    {
        
    }
}
